﻿using Azure;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Password_Manager
{
    public partial class AddEncryptedFiles : Form
    {
        int addId; // 用户ID

        public AddEncryptedFiles(int account)
        {
            InitializeComponent();
            addId = account; // 设置用户ID

        }

        private void AddEncryptedFiles_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e) //添加按钮
        {
            ManagerInterface managerInterface = new ManagerInterface(addId);

            string file = textBox1.Text;
            {
                if (file == "")
                {
                    MessageBox.Show("密码未输入！");
                    return;
                }
                managerInterface.AddFile(file);
               
            }
        }


        private void button2_Click(object sender, EventArgs e) //取消按钮
        {
           
            this.Close();
            this.Dispose();
        }

        
    }
}
